import request from '../utils/request.js'

export function getFilms(pageNum) {
  return request({
    url: `/gateway?cityId=350100&pageNum=${pageNum}&pageSize=10&type=1&k=9918872`,
    headers: { 'x-host': 'mall.film-ticket.film.list' }
  })
}

export function getFilmDetail(params) {
  return request({
    url: `/gateway`,
    headers: { 'x-host': 'mall.film-ticket.film.info' },
    params
  })
}

export function getCinemaList(cityId) {
  return request({
    url: `/gateway?cityId=${cityId}&ticketFlag=1&k=2500238`,
    headers: { 'X-Host': 'mall.film-ticket.cinema.list' }
  })
}

export function getCity() {
  return request({
    url: `/gateway?k=2500238`,
    headers: { 'X-Host': 'mall.film-ticket.city.list' }
  })
}